//bange_image.hpp
//Copyright (C) 2010-2011 Oscar (.teri) Triano

//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation, either version 3 of the License, or
//(at your option) any later version.

//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU General Public License for more details.

//You should have received a copy of the GNU General Public License
//along with this program.  If not, see <http://www.gnu.org/licenses/>.

#ifndef _bange_image_
#define _bange_image_

#include <cstring>
#include <cstdio>
#include <lua5.1/lua.hpp>
#include <SFML/Graphics.hpp>
#include <bange_box.hpp>//bange::readfilefrompackage
#include <bange_aux.hpp>

#include <bange_base.hpp>

using namespace std;

namespace bange{
	
	class image: public sf::Image, public bange::base{
		public:
		
			static void RegisterVM(lua_State *);
			
			bool NewIndex(lua_State *);
			bool Index(lua_State *);
			void CleanVM(lua_State *){};
			
	};

}

//bange.
static int bangeimage_LoadImage(lua_State *);

static int bangeimage_SaveToFile(lua_State *);//method
static int bangeimage_CreateMaskFromColor(lua_State *);//method
static int bangeimage_Copy(lua_State *);//method, yet not implemented
static int bangeimage_SetPixel(lua_State *);//method
static int bangeimage_GetPixel(lua_State *);//method

#endif
